/*************************************************************************
	#	 FileName	: smalldemo.c
	#	 Author		: fengjunhui 
	#	 Email		: 18883765905@163.com 
	#	 Created	: 2017年11月08日 星期三 17时02分16秒
 ************************************************************************/

#include<stdio.h>
#include <unistd.h>

int homework_for_you()
{
	int sum = 0;
	int i = 0;
	for(i = 1;i <= 10; i++){
		if(i % 5 == 0){
			continue;
		}
		sum += i;
		printf("i = %d\n",i);
	}
	printf("sum = %d\n",sum);

	printf("well done!\n");
	return 0;
}


int class_study()
{
	int cls[3]={0};
	int i = 0;
	
	printf("example: level2 day4 class3 : 2 4 3 \n");
	printf("please input your class: ");
	do{
		do {
			scanf("%d",&cls[i++]);
		}while(getchar() != '\n');
	}while(i > 3);

	printf("class begin, stand up ,please....\n");
	sleep(3);
	printf("today's class is over!...\n");
	homework_for_you();

	return 0;
}


int embedded_development(int i)
{
	printf("embedded_development.\n");
	if(i == 1){
		printf("welcome.");
		class_study();
	}else{
		return i;
	}
	
	return 0;
}

int internet_development(int i)
{
	printf("internet_development.\n");

	return 0;
}

int starmaker_development(int i)
{
	printf("starmaker_development.\n");

	return 0;
}


int main(int argc, const char *argv[])
{
	int data[3] = {0};
	int i = 0;

	printf("*****************************************\n");
	printf("****1.Embedded 2.Internet 3.StarMaker****\n");
	printf("*****************************************\n");
	printf("please input the data: ");
	
	scanf("%d",&i);
	getchar();

	switch (i){
		case 1:
			embedded_development(i);
			break;
		case 2:
			internet_development(i);
			break;
		case 3:
			starmaker_development(i);
			break;
		default:
			printf("input error! \n");
			break;
	}

	
	return 0;
}
